Write-Host "Preparing winCodeSign for offline build..." -ForegroundColor Green

# Create project cache directory
$projectCacheDir = "cache"
$winCodeSignDir = "$projectCacheDir\winCodeSign"

if (!(Test-Path $projectCacheDir)) {
    New-Item -ItemType Directory -Path $projectCacheDir
}
if (!(Test-Path $winCodeSignDir)) {
    New-Item -ItemType Directory -Path $winCodeSignDir
}

Write-Host "Please extract winCodeSign-2.6.0.7z to this location:" -ForegroundColor Yellow
Write-Host "$winCodeSignDir\" -ForegroundColor Cyan
Write-Host ""
Write-Host "After extraction, the structure should be:" -ForegroundColor Yellow
Write-Host "cache\winCodeSign\" -ForegroundColor White
Write-Host "  - winCodeSign-2.6.0\" -ForegroundColor White
Write-Host "    - winCodeSign.exe" -ForegroundColor White
Write-Host "    - (other files...)" -ForegroundColor White
Write-Host ""
Write-Host "Note: %USERPROFILE% is your Windows user profile directory (usually C:\Users\YourUsername)" -ForegroundColor Gray
Write-Host ""
Read-Host "Press any key to continue..." 